package com.scorpio.baselibrary.utils.glide;

import android.content.Context;
import android.content.pm.PackageInfo;
import androidx.annotation.NonNull;

import com.bumptech.glide.load.model.ModelLoader;
import com.bumptech.glide.load.model.ModelLoaderFactory;
import com.bumptech.glide.load.model.MultiModelLoaderFactory;

import java.io.InputStream;

/**
 * created by zhud on 2019/9/29
 */

public class ApkModelLoaderFactory implements ModelLoaderFactory<PackageInfo, InputStream> {
    private Context context;

    public ApkModelLoaderFactory(Context context) {
        this.context = context;
    }

    @NonNull
    @Override
    public ModelLoader<PackageInfo, InputStream> build(@NonNull MultiModelLoaderFactory multiFactory) {
        return new ApkIconModelLoader(context);
    }

    @Override
    public void teardown() {

    }
}